<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('车辆参数-悬架系统')" />
    <th:block th:include="include :: bootstrap-fileinput-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-car-edit" th:object="${car}">
            <div class="table-responsive">
                <table class="table table-bordered table-striped">
                    <thead>
                    <tr>
                        <th colspan="4" class ="text-center">悬架配置</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <th class="text-nowrap">前悬架系统</th>
                        <td>
                            <select name="companyId" class="form-control m-b" th:with="type=${@dict.getType('config_suspension_system')}" required>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </td>
                        <th>后悬架系统</th>
                        <td>
                            <select name="companyId" class="form-control m-b" th:with="type=${@dict.getType('config_passive_safety')}" required>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <table class="table table-bordered table-striped">
                    <thead>
                    <tr>
                        <th colspan="4" class ="text-center">轮胎配置</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <th class="text-nowrap">前轮</th>
                        <td colspan="3">
                            <table class="table table-bordered table-striped">
                                <tbody>
                                <tr>
                                    <th>尺寸</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                    <th>负重指数</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                </tr>
                                <tr>
                                    <th>速度级别</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                    <th>车轮宽度</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                </tr>
                                <tr>
                                    <th>ET值</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                    <th>耐磨指数</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <th class="text-nowrap">后轮</th>
                        <td colspan="3">
                            <table class="table table-bordered table-striped">
                                <tbody>
                                <tr>
                                    <th>尺寸</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                    <th>负重指数</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                </tr>
                                <tr>
                                    <th>速度级别</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                    <th>车轮宽度</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                </tr>
                                <tr>
                                    <th>ET值</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                    <th>耐磨指数</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <th class="text-nowrap">备胎</th>
                        <td colspan="3">
                            <table class="table table-bordered table-striped">
                                <tbody>
                                <tr>
                                    <th>尺寸</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                    <th>负重指数</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                </tr>
                                <tr>
                                    <th>速度级别</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                    <th>车轮宽度</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                </tr>
                                <tr>
                                    <th>ET值</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                    <th>耐磨指数</th>
                                    <td><td><input type="text" name="" class="form-control" placeholder="请输入文本"></td></td>
                                </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <table class="table table-bordered table-striped">
                    <thead>
                    <tr>
                        <th colspan="4" class ="text-center">制动配置</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <th class="text-nowrap">前制动系统</th>
                        <td>
                            <select name="companyId" class="form-control m-b" th:with="type=${@dict.getType('config_braking_system')}" required>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </td>
                        <th>后制动系统</th>
                        <td>
                            <select name="companyId" class="form-control m-b" th:with="type=${@dict.getType('config_braking_system')}" required>
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                            </select>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <table class="table table-bordered table-striped">
                    <thead>
                    <tr>
                        <th class ="text-center">系统图片</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td>
                            <div class="file-loading">
                                <input id="fileinput-introduction" name="introduction" type="file" multiple>
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </form>
    </div>
    <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: bootstrap-fileinput-js" />
    <script type="text/javascript">
        $(document).ready(function () {
            $("#fileinput-introduction").fileinput({
                'theme': 'explorer-fas',
                'uploadUrl': '#',
                overwriteInitial: false,
                initialPreviewAsData: true,
                initialPreview: [
                    // "http://localhost:8888/profile/upload/2020/08/22/05a34f0a3b74458f897a11c245a9db4f.jpg"
                ]
            });
        });

        var prefix = ctx + "car/car";
        $("#form-car-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                // $.operate.save(prefix + "/edit", $('#form-car-edit').serialize());
            }
        }
    </script>
</body>
</html>
